import re
import os

#Add the path for the folder with minutes with .txt extension
folder='/Users/bde254/Desktop/GuatemalaMinutes/'

votes=0
nocase_votes=0
pos_votes=0
neg_votes=0
pattern = re.compile(r'\(SIGNOS',re.IGNORECASE)


for minute in os.listdir(folder):
	file=folder+minute
	minute_text=open(file).read()
	nocase_votes+=len(pattern.findall(minute_text))
	votes+=len(re.findall('\(SIGNOS',minute_text))
	pos_votes+=len(re.findall('\(SIGNOS AFIRMATIVOS\)',minute_text))
	neg_votes+=len(re.findall('\(SIGNOS NEGATIVOS\)',minute_text))
	print file
	print len(re.findall('\(SIGNOS',minute_text))

